import update from "react-addons-update";
import { coreDispatch } from "../utils/StoreUtil";

const MsgReducer: object = {
    namespace: "msgReducer",
    state: {
        showMsg: undefined
    },
    showMessage: function (showMsg) {
        return update(this.state, {showMsg: {$set: showMsg}})
    }
};


export const showMessage=(info)=>{
    coreDispatch("msgReducer/showMessage", info);
}

export default MsgReducer;